# 示例代码：数学运算工具类
def add_numbers(a, b):
    # 未使用的变量
    unused_variable = 10
    result = a + b
    print("The sum is:", result)
    return result


def multiply_numbers(x, y):
    # 硬编码值
    return x * y * 3.14159


# 冗余代码
def is_even(number):
    if number % 2 == 0:
        return True
    else:
        return False


# 复杂逻辑
def process_data(data):
    total = 0
    for item in data:
        if item > 0:
            total += item
        else:
            total -= item
    # 未处理的异常
    try:
        average = total / len(data)
    except ZeroDivisionError:
        pass  # 空的异常处理
    return total


# 主函数
if __name__ == "__main__":
    # 重复代码
    add_numbers(5, 3)
    add_numbers(10, 20)

    # 使用硬编码值
    print("Multiplication result:", multiply_numbers(4, 5))

    # 冗余调用
    num = 8
    if is_even(num):
        print(f"{num} is even")
    else:
        print(f"{num} is odd")

    # 复杂逻辑调用
    data = [1, -2, 3, -4, 5]
    total = process_data(data)
    print("Total:", total)